<template>
  <div>
    <HmNum
      :goodsNum="goodsNum"
      :min="min"
      :max="max"
      @setGoodsNum2="setGoodsNum2"
      @setGoodsNum="setGoodsNum"
    ></HmNum>
  </div>
</template>
<script>
import HmNum from '@/components/HmNum.vue'
export default {
  components: {
    HmNum
  },
  data () {
    return {
      goodsNum: 10,
      min: 1,
      max: 20
    }
  },
  methods: {
    setGoodsNum () {
      this.goodsNum++
      console.log('setGoodsNum')
    },
    setGoodsNum2 () {
      this.goodsNum--
    }
  }
}
</script>
<style></style>
